<?php

require_once "BaseService.php";

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of InteresadosService
 *
 * @author Virtualidad
 */
class InteresadosService extends BaseService {

    function Create(Interesados $Interesado) {
        $serializer = parent::getSerializer(parent::getMimeType(), "Interesados");
        $data = $serializer->serialize($Interesado);
        $response = parent::invokeService("Create", $data);
        return $response;
    }

    /**
     *
     * @param Identificacion $Identificacion
     * @return <type>
     */
    function GetByIdentificacion(Identificacion $Identificacion) {
        $encoder = parent::getSerializer(parent::getMimeType(), "Identificacion");
        $id = $encoder->serialize($Identificacion);
        $response = parent::invokeService("GetByIdentificacion", $id);

        Loader::using("models::entities::Interesados");
        $result = parent::processSingleObjectResponse($response, parent::getMimeType(), "Interesados", Interesados::MAPPING());

        return $result;
    }

    /**
     *
     * @param int $CodigoPlan
     * @return <type>
     */
    function GetByPlanEstudio($CodigoPlan) {
        $response = parent::invokeService("GetByPlanEstudio", $CodigoPlan);

        Loader::using("models::entities::Interesados");
        $result = parent::processSingleObjectResponse($response, parent::getMimeType(), "Interesados", Interesados::MAPPING());

        return $result;
    }

    /**
     *
     * @param PeriodoAcademico $PeriodoAcademico
     * @return <type> 
     */
    function GetByPeriodoAcademico(PeriodoAcademico $PeriodoAcademico) {
        $encoder = parent::getSerializer(parent::getMimeType(), "PeriodoAcademico");
        $id = $encoder->serialize($PeriodoAcademico);
        $response = parent::invokeService("GetByPeriodoAcademico", $id);

        Loader::using("models::entities::Interesados");
        $result = parent::processArrayResponse($response, parent::getMimeType(), "Interesados", Interesados::MAPPING());

        return $result;
    }

    function GenerarPDF(InteresadoPk $InteresadoPk) {
        $encoder = parent::getSerializer(parent::getMimeType(), "InteresadoPk");
        $id = $encoder->serialize($InteresadoPk);
        $response = parent::invokeService("GenerarPDF", $id);

        Loader::using("models::entities::Interesados");

        return $response;
    }

    public function getServiceClass() {
        return "Interesados";
    }

    public function __construct($serviceBaseURL) {
        parent::__construct($serviceBaseURL);
    }

}

?>
